﻿#ifndef SHAPE_H
#define SHAPE_H
#include<iostream>
#include<QPaintEvent>
#include<QPainter>
/**
 *桥接模式
 * 定义两个基类，用子类分别派生，在其一个基本中创建另一个基类对象进行调用
 */
using namespace std;
class Shape
{
public:
    Shape();
    virtual ~Shape(){}
    virtual void drawShapre()=0;
};

class DrawCricle:public Shape
{
public:
    DrawCricle(){};
    ~DrawCricle(){};
   void drawShapre() override{
        cout<<"this is DrawCricle!!";
    };
protected:
   void paint(QPaintEvent*);
};

#endif // SHAPE_H
